<!-- 商家钱包日志表表单弹窗 -->
<form id="businesswallelog-form" lay-filter="businesswallelog-form" class="layui-form model-form" style="overflow:auto; height:500px;width:90%;">
    <input name="id" type="hidden"/>
    				    <div class="layui-form-item">
        <label class="layui-form-label">会员ID</label>
        <div class="layui-input-block">
            <input name="businessId" placeholder="请输入会员ID" type="text" class="layui-input" maxlength="20"  id="businessId"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">操作项目，1-余额，2-累计余额，3-佣金余额，4-佣金冻结，5-佣金总额，6-积分剩余，7-积分累计数，8-赠送金额，9-赠送总额，10-消费总金额</label>
        <div class="layui-input-block">
            <input name="walletItem" placeholder="请输入操作项目，1-余额，2-累计余额，3-佣金余额，4-佣金冻结，5-佣金总额，6-积分剩余，7-积分累计数，8-赠送金额，9-赠送总额，10-消费总金额" type="text" class="layui-input" maxlength="20"  id="walletItem"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">操作类型，1-增加，2-减少</label>
        <div class="layui-input-block">
            <input name="action" placeholder="请输入操作类型，1-增加，2-减少" type="text" class="layui-input" maxlength="20"  id="action"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">增减的数量</label>
        <div class="layui-input-block">
            <input name="amount" placeholder="请输入增减的数量" type="text" class="layui-input" maxlength="20"  id="amount"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">关联单号</label>
        <div class="layui-input-block">
            <input name="linkOrder" placeholder="请输入关联单号" type="text" class="layui-input" maxlength="20"  id="linkOrder"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">业务模块</label>
        <div class="layui-input-block">
            <input name="module" placeholder="请输入业务模块" type="text" class="layui-input" maxlength="20"  id="module"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">操作说明</label>
        <div class="layui-input-block">
            <input name="description" placeholder="请输入操作说明" type="text" class="layui-input" maxlength="20"  id="description"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">操作人ID</label>
        <div class="layui-input-block">
            <input name="createId" placeholder="请输入操作人ID" type="text" class="layui-input" maxlength="20"  id="createId"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label">创建时间</label>
        <div class="layui-input-block">
            <input name="createDate" placeholder="请输入创建时间" type="text" class="layui-input" maxlength="20"  id="createDate"
                   lay-verify="required" required/>
        </div>
    </div>
 		    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-block">
            <input name="remark" placeholder="请输入" type="text" class="layui-input" maxlength="20"  id="remark"
                   lay-verify="required" required/>
        </div>
    </div>
     <div class="layui-form-item model-form-footer">
        <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button>
        <button class="layui-btn" lay-filter="user-form-submit" lay-submit>保存</button>
    </div>
</form>

<script>
    layui.use(['layer', 'admin', 'form', 'formSelects'], function () {
        var layer = layui.layer;
        var admin = layui.admin;
        var form = layui.form;
        var formSelects = layui.formSelects;
 
        var businesswallelog = admin.getTempData('t_businesswallelog');
           if (businesswallelog.method=="update"){
        	form.val('businesswallelog-form', businesswallelog);
            form.render();
        }
        // 表单提交事件
        form.on('submit(user-form-submit)', function (data) {
             layer.load(2);
            
            admin.req('business/businesswallelog/'+businesswallelog.method, JSON.stringify(data.field), function (data) {
                layer.closeAll('loading');
                if (data.code == 0) {
                    layer.msg(data.msg, {icon: 1, time: 500});
                    admin.finishPopupCenter();
                } else {
                    layer.msg(data.msg, {icon: 2, time: 500});
                }
            }, "post");  
            return false;
        });
    });
</script>
